//
//  contact.m
//  contact1
//
//  Created by 谢谦 on 16/2/6.
//  Copyright © 2016年 杜苏南. All rights reserved.
//

#import "contact.h"

@implementation contact

-(NSString *)getName
{
    return [NSString stringWithFormat:@"%@ %@",_firstName,_lastName];

}

-(contact *)initWithFirstName:(NSString *)firstName withLastName:(NSString *)lastName withPhoneNumber:(NSString *)phoneNumber
{
    if (self = [super init]) {
        _firstName = firstName;
        _lastName = lastName;
        _phoneNumber =phoneNumber;
    }
    return self;

}

+(contact *)initWithFirstName:(NSString *)firstName withLastName:(NSString *)lastName withPhoneNumber:(NSString *)phoneNumber
{
    contact *c1 = [[contact alloc]initWithFirstName:firstName withLastName:lastName withPhoneNumber:phoneNumber];
    return c1;

}

@end
